home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
os2
/
foss11b3.zip
/
DEVELOP
/
TYPES.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1996-06-19
|
39KB
|
810 lines
unit Types;
interface
const
{ ========================================================================== }
{ Size of maximum sized 16-bit arrays of Byte, Word or LongInts }
{ ========================================================================== }
CByteMaxHigh = 65520;
CWordMaxHigh = ( CByteMaxHigh div 2 );
CLongMaxHigh = ( CWordMaxHigh div 2 );
{ ========================================================================== }
{ Maximum sized 16-bit arrays of Byte, Word or LongInts }
{ ========================================================================== }
type
TByteMax = array[0..( CByteMaxHigh - 1 )] of Byte;
TWordMax = array[0..( CWordMaxHigh - 1 )] of Word;
TLongMax = array[0..( CLongMaxHigh - 1 )] of LongInt;
{ ========================================================================== }
{ Maximum sized 16-bit arrays which can be accessed as Byte, Word or
LongInts }
{ ========================================================================== }
type
TBufMax = record
case Byte of
0: ( Bytes : TByteMax );
1: ( Words : TWordMax );
2: ( Longs : TLongMax );
end; { record TBufMax }
{ ========================================================================== }
{ Message text buffer, buffer used for all kind of messages in FOSS }
{ ========================================================================== }
type
PMsgBuffer = ^TMsgBuffer;
TMsgBuffer = array[0..( CByteMaxHigh - 1 )] of Char;
{ ========================================================================== }
{ Types orginally defined in the DOS unit }
{ ========================================================================== }
type
PathStr = string[79];
DirStr = string[67];
{ ========================================================================== }
{ String types, just to simplify further definitions }
{ ========================================================================== }
type
Str4 = string[4];
Str6 = string[6];
Str10 = string[10];
Str12 = string[12];
Str16 = string[16];
Str30 = string[30];
Str40 = string[40];
Str46 = string[46];
Str60 = string[60];
Str80 = string[80];
Str200 = string[200];
{ ========================================================================== }
{ Date and time types }
{ ========================================================================== }
type
TDate = record
case Word of
0: ( Year : Word;
Month,
Day : Byte );
1: ( RAW : LongInt );
end; { record TDate (4 Bytes) }
TTime = record
case Byte of
0: ( Hour,
Minute : Byte );
1: ( RAW : Word );
end; { record TTime (2 Bytes) }
TDateTime = record
Date : TDate;
Time : TTime;
end; { record TDateTime (6 Bytes) }
{ ========================================================================== }
{ Password type, used to store password and Expiry date }
{ ========================================================================== }
type
TPassword = record
Pwd : Str12; { Password string }
Date : TDate; { Expire date of password }
end; { record TPassword }
{ ========================================================================== }
{ System text type, used to store the FOSSTEXT.* files in memory }
{ ========================================================================== }
type
TTxt = record
Pnt : array[0..799] of record
Pos : Word; { Position of text in Text array }
Len : Char; { Length of text in Text array }
end; { record Pnt }
Text : array[0..49151] of Byte;
end; { record TTxt }
{ ========================================================================== }
{ System meny types, used to store meny setup from FOSSTEXT.* files in
memory }
{ ========================================================================== }
type
TMenuKey = record
Func : string[25]; { Command string }
MinKey : Byte; { Minimum number of matched
characters from start of string }
end; { record TMenuKey }
PMenus = ^TMenus;
TMenus = array[0..99] of TMenuKey;
{ ========================================================================== }
{ Access type, used to store different sets of Access in areas }
{ ========================================================================== }
type
TAccess = ( acReadMsg, { Allowed to read messages }
acWriteMsg, { Allowed to write messages }
acUploadFile, { Allowed to upload files }
acDownloadFile, { Allowed to download files }
acOpenDoor, { Allowed to open doors }
acAreaOp, { Allowed to use AreaOp functions in
SysOp menu }
acSysOp, { Allowed to use SysOp function in
SysOp menu }
acRFU ); { RFU }
SAccess = set of TAccess;
{ ========================================================================== }
{ Graph type, used to store what kind of additional control characters to
send in addition to the standard AscII set }
{ ========================================================================== }
type
TGraph = ( grIBM, { Allow high 128+ AscII characters }
grANSI ); { Allow ANSI control codes }
SGraph = set of TGraph;
{ ========================================================================== }
{ ClearScr type, used to store when the user wants the screen blanked }
{ ========================================================================== }
type
TClearScr = ( clMenu, { Clear screen before menus }
clMsg, { Clear screen before messages }
clBullet ); { Cleer screen before bulletins }
SClearScr = set of TClearScr;
{ ========================================================================== }
{ ANSIUse type, used to store when the user wants ANSI graphics used }
{ ========================================================================== }
type
TANSIUse = ( anMenu, { Use ANSI graphics in menus }
anMsg, { Use ANSI graphics in messages }
anBullet ); { Use ANSI graphics in bulletins }
SANSIUse = set of TANSIUse;
{ ========================================================================== }
{ ARC type, used to store preferred archive format }
{ ========================================================================== }
type
TArc = ( arNone, { Archiving not preferred }
arZIP, { Use ZIP archiving }
arARC, { Use ARC archiving }
arLZH, { Use LZH/LHA archiving }
arARJ ); { Use ARJ archiving }
{ ========================================================================== }
{ AreaMark type, used to store message marking in memory }
{ ====